﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MVVMLab
{
    /// <summary>
    /// Interaction logic for AppicationMainWindow.xaml
    /// </summary>
    public partial class ApplicationMainWindow : Window
    {
        public ApplicationMainWindow()
        {

            LabContactViewModel labContactViewModel = new LabContactViewModel ();

            labContactViewModel.LabContact = new LabContact
            { 
                            Birthday = DateTime.Now.AddYears (-20), 
                            FirstName = "John", 
                            LastName = "Smith", NumberOfComputers = 3};

            this.DataContext = labContactViewModel;  
            InitializeComponent(); 
 
        }
    }
}
